﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BleachReader
{
    class Program
    {
        static void Main(string[] args)
        {
            Log.Instance.WriteInfo("Spider initialized.");
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            Spider.Instance.Run();
            Log.Instance.WriteInfo("Spider exited.");
        }

        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Log.Instance.WriteInfo();
            Log.Instance.WriteInfo("UnhandledException: {0}", e.ExceptionObject);
            Log.Instance.WriteInfo();
        }
    }
}
